Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Included -x option for Hx file with Fuses defined #70

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gpreviato
Copy link

We use hex files with flash definition inside. This means that the Hex file is built with a special address, starting at 0x820000, record 04, that defines the list of Fuses.
There is not problems fusing the chips with PikKit4 and mplabx.
The same file loaded with pyupdi gives a file dimension problem: intelhex creates the full space address, increasing the file dimension that becomes by far bigger than the space available.
So, I have added a new flag '-x' that solve this condition. It parses the hex files and divide it in two parts: the as 'hex' and the second as 'fuses array'. So far, seems working...

@gpreviato
Copy link
Author

... sorry... it also programs fuses and code at the same time

@mraardvark
Copy link
Owner

Question: have you considered using pymcuprog? It uses pyupdi behind the scenes if you specify "uart" as a tool.
Latest from the test server:
pip install -i https://test.pypi.org/simple/ pymcuprog

@gpreviato
Copy link
Author

Onestly I didn't know pymcuprog. I'll give a check. Thank you for the hint!

@gpreviato
Copy link
Author

Hi, seems that pymcuprog doesn't works on some 32bit hardware.
pyupdi it's perfect in this environemt. So thank you for your effort.

@mraardvark
Copy link
Owner

Would you mind elaborating on how pymcuprog fails? What sort of hardware are you using?

@gpreviato
Copy link
Author

An Intel Celeron Board, with 1Gbytes RAM and Debian 9.0 installed. Seems a pretty standard board... We had problems in installation and fails in programming. We go forward with pyupdi onestly we didn't spent too much time to understand why pymcuprog fails....

Lockbits can be inserted as parameters or in the hex files with 04 record 0x83

Reprogramming can be done.
1) Try to program the device;
2) Reset the power and then reprogram it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants